home *** CD-ROM | disk | FTP | other *** search
- /* Askhost script for use with AmIRC 1.x */ Version='1.03'/*
- // Written by Deryk Robosson 11.18.96
- //
- // newlook@ameritech.net newlook on #amiga IRC (EfNet)
- //
- // 3.1.97 Corrected problem with SAY. Reported by SimD
- // 15.1.97 Supports showing a user the output
- // Supports passing user nick for input
- // 3.3.97 Corrected typo in my name ;)
- // 4.3.97 Prettied up the help/ver info a bit
- */
- bold=d2c(2)
- underline=x2c('1F')
- esc=d2c(27)
- tempfile="t:Askhost.temp"
-
- options results
- parse arg param
-
- param=strip(upper(param))
- if param="" then do
- Call Version()
- Exit
- end
-
- if param='VER' then do
- Call Version()
- Exit
- end
-
- if param='HELP' then do
- Call Help()
- Exit
- end
-
- if param~="" then do
- parse var param where" "command
- parse var where domain"."whatever
- if whatever="" then do
- 'USERHOST 'where
- if result~="RESULT" then parse var result blah"@"host
- end
- else host=where
-
- if command~="" then do
- parse var command command" "user
- end
- else command=""
- end
-
- ADDRESS COMMAND 'amitcp:bin/Askhost 'host' >T:Askhost.temp'
-
- if open(file, tempfile,'R') then do
- do until eof(file)
- line=ReadLn(file)
- select
- when line=' ' then nop
- otherwise
- select
- when command="SAY" then 'SAY 'line
- when command="SHOW" then "RAW NOTICE" user ":"line
- otherwise
- if command="" then "ECHO "line
- end
- end
- end
- close(file)
- ADDRESS COMMAND 'delete >NIL: ' tempfile 'quiet force'
- end
- Exit
-
- Version:
- "ECHO P="ESC||BOLD"«Askhost» Askhost.AMIRX"BOLD" Version "BOLD||VERSION||BOLD
- "ECHO P="ESC||BOLD"«Askhost» Read the top of Askhost.AMIRX script for history."
- "ECHO P="ESC||BOLD"«Askhost» "BOLD"©1996"BOLD" Deryk Robosson "BOLD"(newlook)"BOLD" - [newlook@ameritech.net]"
- "ECHO P="ESC||BOLD"«Askhost» Type /<alias> help for command information"
- return
-
- Help:
- "ECHO P="ESC||BOLD"«Askhost» "BOLD"Askhost.AMIRC"BOLD" Help"
- "ECHO P="ESC||BOLD"«Askhost» "BOLD"SAY - "BOLD"echos output to window"
- "ECHO P="ESC||BOLD"«Askhost» "BOLD"VER - "BOLD"displays script version"
- "ECHO P="ESC||BOLD"«Askhost» "BOLD"SHOW - "BOLD"displays outout to user"
- "ECHO P="ESC||BOLD"«Askhost» "BOLD"HELP - "BOLD"displays this file"
- "ECHO P="ESC||BOLD"«Askhost» "BOLD||UNDERLINE"EXAMPLES:"BOLD||UNDERLINE
- "ECHO P="ESC||BOLD"«Askhost» "BOLD"/Askhost site "BOLD" to see output yourself"
- "ECHO P="ESC||BOLD"«Askhost» "BOLD"/Askhost usernick "BOLD" to see output yourself"
- "ECHO P="ESC||BOLD"«Askhost» "BOLD"/Askhost site SAY "BOLD" to show output to channel"
- "ECHO P="ESC||BOLD"«Askhost» "BOLD"/Askhost site SHOW nick "BOLD" to show output to a user"
- return
-